/*
 * @Descripttion: 
 * @Author: yubo
 * @Date: 2022-10-31 14:20:01
 * @LastEditTime: 2022-10-31 14:35:55
 */
use std::collections::BinaryHeap;
fn main() {
    let mut heap = BinaryHeap::new();   //创建空的最大堆
    assert_eq!(heap.peek(), None);  //使用peek方法可以取出堆中的最大值
    let arr = [33, 80, 48, 53, 72, 18, 30, 45, 24];
    for &i in arr.iter() {
        heap.push(i);
    }

    assert_eq!(heap.peek(), Some(&80));
    println!("{:?}", heap);
}

